﻿<UserControl xmlns:my="clr-namespace:TextAdventures.Quest.EditorControls"  x:Class="TextAdventures.Quest.EditorControls.CompassControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="800">
    <UserControl.Resources>
        <Style TargetType="{x:Type my:CompassDirectionControl}">
            <Setter Property="Height" Value="100"></Setter>
            <Setter Property="Width" Value="120"></Setter>
        </Style>
    </UserControl.Resources>
    <Grid Background="White">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="250" />
        </Grid.ColumnDefinitions>
        
        <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Hidden">
            <Grid HorizontalAlignment="Center">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <my:CompassDirectionControl x:Name="dirNW" Grid.Row="0" Grid.Column="0" Direction="0" />
                <my:CompassDirectionControl x:Name="dirN" Grid.Row="0" Grid.Column="1" Direction="1" />
                <my:CompassDirectionControl x:Name="dirNE" Grid.Row="0" Grid.Column="2" Direction="2" />
                <my:CompassDirectionControl x:Name="dirW" Grid.Row="1" Grid.Column="0" Direction="3" />
                <my:CompassDirectionControl x:Name="dirE" Grid.Row="1" Grid.Column="2" Direction="4" />
                <my:CompassDirectionControl x:Name="dirSW" Grid.Row="2" Grid.Column="0" Direction="5" />
                <my:CompassDirectionControl x:Name="dirS" Grid.Row="2" Grid.Column="1" Direction="6" />
                <my:CompassDirectionControl x:Name="dirSE" Grid.Row="2" Grid.Column="2" Direction="7" />
                <Grid Grid.Column="3" Grid.RowSpan="3" VerticalAlignment="Center">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <my:CompassDirectionControl x:Name="dirUp" Grid.Row="0" Direction="8" />
                    <my:CompassDirectionControl x:Name="dirDown" Grid.Row="1" Direction="9" />
                </Grid>
                <Grid Grid.Column="4" Grid.RowSpan="3" VerticalAlignment="Center">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <my:CompassDirectionControl x:Name="dirIn" Grid.Row="0" Direction="10" />
                    <my:CompassDirectionControl x:Name="dirOut" Grid.Row="1" Direction="11" />
                </Grid>

            </Grid>
        </ScrollViewer>

        <my:CompassEditorControl x:Name="compassEditor" Background="{x:Static SystemColors.ControlBrush}" Grid.Column="1" Margin="10,0,0,0" Padding="10" />
    </Grid>
</UserControl>
